package io.imp.modules.tasks.unionqrc.service;


import io.imp.commons.dynamic.datasource.annotation.DataSource;
import io.imp.modules.tasks.unionqrc.dao.ItcsTransJnlDao;
import io.imp.modules.tasks.unionqrc.entity.ItcsTransJnl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class ItcsTransJnlService {
    @Autowired
    private ItcsTransJnlDao itcsTransJnlDao;

    @DataSource("slave1")
    public ItcsTransJnl getTnoAndSid(String orderNo){
        return itcsTransJnlDao.getTnoAndSid(orderNo);
    }

    @DataSource("slave1")
    public List<ItcsTransJnl> getByCreatetime(Date createtime, Date nowTime, Date lTime){
        return itcsTransJnlDao.getByCreatetime(createtime,nowTime,lTime);
    }
}
